﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="reply_sends_edit.aspx.cs" Inherits="SF.Ucenter.admin.gwxfun.reply_sends_edit" %>
<%@ Import Namespace="SF.Common" %>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <title>编辑推送消息</title>
    <link href="../../scripts/artdialog/ui-dialog.css" rel="stylesheet" type="text/css" />
    <link href="../skin/default/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" charset="utf-8" src="../../scripts/jquery/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../scripts/jquery/Validform_v5.3.2_min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../scripts/datepicker/WdatePicker.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../scripts/artdialog/dialog-plus-min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../scripts/webuploader/webuploader.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/uploader.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/laymain.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/common.js"></script>
    
    <script type="text/javascript">
        $(function () {
            //初始化表单验证
            $("#form1").initValidform();

            //初始化上传控件[封面图片]
            $(".upload-img").each(function () {
                $(this).InitUploader({ filesize: "10240", sendurl: "../../tools/upload_ajax.ashx", swf: "../../scripts/webuploader/uploader.swf", filetypes: "gif,jpg,png,bmp,rar,zip,doc,xls,txt" });
            });
            $(".upload-voice").InitUploader({ filesize: "20480", sendurl: "../../tools/upload_ajax.ashx", swf: "../../scripts/webuploader/uploader.swf", filetypes: "mp3,amr" });
            $(".upload-video").InitUploader({ filesize: "102400", sendurl: "../../tools/upload_ajax.ashx", swf: "../../scripts/webuploader/uploader.swf", filetypes: "mp4" });
            $("dl[name='isshow']").hide();
            $("#dlrblUsers").hide();
            $("#userTypes").children("a").attr("href", "javascript:showUsers();");
            $("#addHeight").show();
            $("#txtMsgNum").change(function () {
                loadImgTextNum($("#txtMsgNum").val());
            });
        })
        function showUsers() {
            $("#dlrblUsers").toggle();
        }
        function showMsgType(obj) {
            $("dl[name='isshow']").hide();
            if (obj!="" && obj == 0) {
                //文字
                $("#dlTexts").show();
            } else if (obj != "" && obj == 1) {
                //图片
                $("#dlUris").show();
            } else if (obj != "" && obj == 2) {
                //图文
                $("#dlrblMsgNum").show();
                loadImgTextNum($("#txtMsgNum").val());
            } else if (obj != "" && obj == 3) {
                //声音
                $("#dlvoice").show();
                $("#addHeight").show();
            } else if (obj != "" && obj == 4) {
                //视频
                $("#dlvideo").show();
                $("#addHeight").show();
            } else {
                $("#addHeight").show();
            }
        }
        //图文加载数量 
        function loadImgTextNum(obj) {
            $("#dlimg0").show();
            $("#dlurl0").show();
            $("#dltext0").show();
            if (obj > 1) {
                $("#dlimg1").show();
                $("#dlurl1").show();
                $("#dltext1").show();
            }
            if (obj > 2) {
                $("#dlimg2").show();
                $("#dlurl2").show();
                $("#dltext2").show();
            }
            if (obj > 3) {
                $("#dlimg3").show();
                $("#dlurl3").show();
                $("#dltext3").show();
            }
            if (obj > 4) {
                $("#dlimg4").show();
                $("#dlurl4").show();
                $("#dltext4").show();
            }
        }
    </script>
</head>

<body class="mainbody">
    <form id="form1" runat="server">
        <!--导航栏-->
        <div class="location">
            <a href="reply_sends_list.aspx" class="back"><i></i><span>返回列表页</span></a>
            <a href="../First.aspx" class="home"><i></i><span>首页</span></a>
            <i class="arrow"></i>
            <a href="reply_sends_list.aspx"><span>推送消息列表</span></a>
            <i class="arrow"></i>
            <span>编辑推送消息</span>
        </div>
        <div class="line10"></div>
        <!--/导航栏-->

        <!--内容-->
        <div id="floatHead" class="content-tab-wrap">
            <div class="content-tab">
                <div class="content-tab-ul-wrap">
                    <ul>
                        <li><a class="selected" href="javascript:;">基本信息</a></li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="tab-content">
            <dl>
                <dt>标题</dt>
                <dd>
                    <asp:TextBox ID="txtKeyWords" runat="server" CssClass="input" datatype="*" sucmsg=" "></asp:TextBox>
                    <span class="Validform_checktip">*50个字符以内</span>
                </dd>
            </dl>
            <dl id="dlCategoryId" >
                <dt>信息类型</dt>
                <dd>
                    <div class="rule-single-select">
                        <asp:DropDownList ID="ddlCategoryId" runat="server" datatype="*" sucmsg=" "  AutoPostBack="true" OnSelectedIndexChanged="ddlCategoryId_SelectedIndexChanged">
                            <asp:ListItem Value="">请选择</asp:ListItem>
                            <asp:ListItem Value="0">文本</asp:ListItem>
                            <asp:ListItem Value="1">图片</asp:ListItem>
                            <asp:ListItem Value="2">图文</asp:ListItem>
                            <asp:ListItem Value="3">声音</asp:ListItem>
                            <asp:ListItem Value="4">视频</asp:ListItem>
                        </asp:DropDownList>
                    </div>
                </dd>
            </dl>
            <dl>
                <dt>用户类型</dt>
                <dd>
                    <div id="userTypes" class="rule-single-checkbox" >
                        <asp:CheckBox ID="cbIsLock" runat="server" Checked="True" />
                    </div>
                    <span class="Validform_checktip">*是 代表群发，否 代表选择用户</span>
                </dd>
            </dl>
            <dl id="dlrblMsgNum" name="isshow" >
                <dt>消息数量</dt>
                <dd>
                    <asp:TextBox ID="txtMsgNum" runat="server" CssClass="input small" datatype="/^[1-5]$/" sucmsg=" " >1</asp:TextBox>
                    <span class="Validform_checktip">*消息数（图文最大为5条，其它消息为1条）</span>
                </dd>
            </dl>
            
            <dl id="dlrblUsers" >
                <dt>选择客户</dt>
                <dd>
                    <div class="rule-multi-checkbox">
                        <asp:CheckBoxList ID="cblItem" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                        </asp:CheckBoxList>
                    </div>
                    <span class="Validform_checktip">*对选择的客户进行推送消息</span>
                </dd>
            </dl>
            
            <dl id="dlvoice" name="isshow" >
                <dt>推送音频</dt>
                <dd>
                    <asp:TextBox ID="txtVoiceUrl" runat="server" CssClass="input normal upload-path" />
                    <div class="upload-box upload-voice"></div>
                    <span class="Validform_checktip">*大小2M以内，播放时间小于60秒，格式：AMR\MP3</span>
                </dd>
            </dl>
            
            <dl id="dlvideo" name="isshow" >
                <dt>推送视频</dt>
                <dd>
                    <asp:TextBox ID="txtVideoUrl" runat="server" CssClass="input normal upload-path" />
                    <div class="upload-box upload-video"></div>
                    <span class="Validform_checktip">*大小10M以内，格式：MP4</span>
                </dd>
            </dl>

            <dl id="dlUris" name="isshow" >
                <dt>推送图片</dt>
                <dd>
                    <asp:TextBox ID="txtImgUrl" runat="server" CssClass="input normal upload-path" />
                    <div class="upload-box upload-img"></div>
                    <span class="Validform_checktip">*大小1M以内，格式：JPG</span>
                    <br />
                    <asp:Image ID="imgUri" CssClass="showimgs" runat="server" Width="200px" Height="200px" />
                </dd>
            </dl>
            <dl id="dlTexts" name="isshow" >
                <dt>推送文本</dt>
                <dd>
                    <asp:TextBox ID="txtSeoDescription" runat="server" CssClass="input" TextMode="MultiLine"></asp:TextBox>
                    <span class="Validform_checktip">*200个字符以内</span>
                </dd>
            </dl>

            <%--图文推送的标签  --%>
            <dl id="dlimg0" name="isshow" >
                <dt>图片1</dt>
                <dd>
                    <asp:TextBox ID="txtimg0" runat="server" CssClass="input normal upload-path" />
                    <div class="upload-box upload-img"></div>
                    <br />
                    <asp:Image ID="img0" CssClass="showimgs" runat="server" Width="200px" Height="200px" />
                </dd>
            </dl>
            <dl id="dlurl0" name="isshow" >
                <dt>图文Url1</dt>
                <dd>
                    <asp:TextBox ID="url0" runat="server" CssClass="input normal" ></asp:TextBox>
                </dd>
            </dl>
            <dl id="dltext0" name="isshow" >
                <dt>文本1</dt>
                <dd>
                    <asp:TextBox ID="text0" runat="server" CssClass="input" TextMode="MultiLine"></asp:TextBox>
                    <span class="Validform_checktip">*50个字符以内</span>
                </dd>
            </dl>
            <dl id="dlimg1" name="isshow" >
                <dt>图片2</dt>
                <dd>
                    <asp:TextBox ID="txtimg1" runat="server" CssClass="input normal upload-path" />
                    <div class="upload-box upload-img"></div>
                    <br />
                    <asp:Image ID="img1" CssClass="showimgs" runat="server" Width="200px" Height="200px" />
                </dd>
            </dl>
            <dl id="dlurl1" name="isshow" >
                <dt>图文Url2</dt>
                <dd>
                    <asp:TextBox ID="url1" runat="server" CssClass="input normal" ></asp:TextBox>
                </dd>
            </dl>
            <dl id="dltext1" name="isshow" >
                <dt>文本2</dt>
                <dd>
                    <asp:TextBox ID="text1" runat="server" CssClass="input" TextMode="MultiLine"></asp:TextBox>
                    <span class="Validform_checktip">*50个字符以内</span>
                </dd>
            </dl>
            <dl id="dlimg2" name="isshow" >
                <dt>图片3</dt>
                <dd>
                    <asp:TextBox ID="txtimg2" runat="server" CssClass="input normal upload-path" />
                    <div class="upload-box upload-img"></div>
                    <br />
                    <asp:Image ID="img2" CssClass="showimgs" runat="server" Width="200px" Height="200px" />
                </dd>
            </dl>
            <dl id="dlurl2" name="isshow" >
                <dt>图文Url3</dt>
                <dd>
                    <asp:TextBox ID="url2" runat="server" CssClass="input normal" ></asp:TextBox>
                </dd>
            </dl>
            <dl id="dltext2" name="isshow" >
                <dt>文本3</dt>
                <dd>
                    <asp:TextBox ID="text2" runat="server" CssClass="input" TextMode="MultiLine"></asp:TextBox>
                    <span class="Validform_checktip">*50个字符以内</span>
                </dd>
            </dl>
            <dl id="dlimg3" name="isshow" >
                <dt>图片4</dt>
                <dd>
                    <asp:TextBox ID="txtimg3" runat="server" CssClass="input normal upload-path" />
                    <div class="upload-box upload-img"></div>
                    <br />
                    <asp:Image ID="img3" CssClass="showimgs" runat="server" Width="200px" Height="200px" />
                </dd>
            </dl>
            <dl id="dlurl3" name="isshow" >
                <dt>图文Url4</dt>
                <dd>
                    <asp:TextBox ID="url3" runat="server" CssClass="input normal" ></asp:TextBox>
                </dd>
            </dl>
            <dl id="dltext3" name="isshow" >
                <dt>文本4</dt>
                <dd>
                    <asp:TextBox ID="text3" runat="server" CssClass="input" TextMode="MultiLine"></asp:TextBox>
                    <span class="Validform_checktip">*50个字符以内</span>
                </dd>
            </dl>
            <dl id="dlimg4" name="isshow" >
                <dt>图片5</dt>
                <dd>
                    <asp:TextBox ID="txtimg4" runat="server" CssClass="input normal upload-path" />
                    <div class="upload-box upload-img"></div>
                    <br />
                    <asp:Image ID="img4" CssClass="showimgs" runat="server" Width="200px" Height="200px" />
                </dd>
            </dl>
            <dl id="dlurl4" name="isshow" >
                <dt>图文Url5</dt>
                <dd>
                    <asp:TextBox ID="url4" runat="server" CssClass="input normal" ></asp:TextBox>
                </dd>
            </dl>
            <dl id="dltext4" name="isshow" >
                <dt>文本5</dt>
                <dd>
                    <asp:TextBox ID="text4" runat="server" CssClass="input" TextMode="MultiLine"></asp:TextBox>
                    <span class="Validform_checktip">*50个字符以内</span>
                </dd>
            </dl>
          <dl id="addHeight" name='isshow' style="margin-top:10%;">
          </dl>
        </div>
        <!--/内容-->

        <!--工具栏-->
        <div class="page-footer">
            <div class="btn-wrap">
                <asp:Button ID="btnSubmit" runat="server" Text="提交保存" CssClass="btn" OnClick="btnSubmit_Click" />
                <input name="btnReturn" type="button" value="返回上一页" class="btn yellow" onclick="javascript: history.back(-1);" />
            </div>
        </div>
        <!--/工具栏-->

    </form>
</body>
</html>
